/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ncs.modelo.impl;

import java.util.List;
import ncs.modelo.dao.UbigeoDao;
import ncs.modelo.entidades.TUbigeo;
import ncs.modelo.util.HibernateUtil;
import org.hibernate.Session;

/**
 *
 * @author rick
 */
public class UbigeoDaoImpl implements UbigeoDao {

    @Override
    public List<TUbigeo> buscarTodos() {
        Session session = HibernateUtil.getSessionFactory().openSession();
        return session.createQuery("FROM TUbigeo").list();
    }
}
